cmake_minimum_required(VERSION 3.0) # 最低版本
project(GOOD) # 工程名 

# 配置编译选项
set(CMAKE_CXX_FLAGS ${PROJECT_SOURCE_DIR} -g) # 保证可执行文件是可调试的

# 配置最终的可执行文件输出的路径
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

add_compile_definitions(_GNU_SOURCE)

# 用于指定编译器在哪些目录下查找头文件（如 .h/.hpp 文件）。
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/include/network)
include_directories(${PROJECT_SOURCE_DIR}/include/network/liburing)
include_directories(${PROJECT_SOURCE_DIR}/include/network/ntyco)
include_directories(${PROJECT_SOURCE_DIR}/include/data_struct)
include_directories(${PROJECT_SOURCE_DIR}/include/master_slack)

include_directories(${PROJECT_SOURCE_DIR}/include/aof_persist)
include_directories(${PROJECT_SOURCE_DIR}/include/tools)

# 用于指定链接器在哪些目录下查找二进制库文件（如 .a/.so/.lib 文件）。
link_directories(${PROJECT_SOURCE_DIR}/lib)  # 项目内自定义库

#加载子目录（指定搜索的子目录）
add_subdirectory(src)
